Integrand size = 26, antiderivative size = 123 \[ \int (b d+2 c d x)^2 \sqrt {a+b x+c x^2} \, dx=-\frac {\left (b^2-4 a c\right ) d^2 (b+2 c x) \sqrt {a+b x+c x^2}}{16 c}+\frac {d^2 (b+2 c x)^3 \sqrt {a+b x+c x^2}}{8 c}-\frac {\left (b^2-4 a c\right )^2 d^2 \text {arctanh}\left (\frac {b+2 c x}{2 \sqrt {c} \sqrt {a+b x+c x^2}}\right )}{32 c^{3/2}} \]
[Out]
Time = 0.04 (sec) , antiderivative size = 123, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {699, 706, 635, 212} \[ \int (b d+2 c d x)^2 \sqrt {a+b x+c x^2} \, dx=-\frac {d^2 \left (b^2-4 a c\right )^2 \text {arctanh}\left (\frac {b+2 c x}{2 \sqrt {c} \sqrt {a+b x+c x^2}}\right )}{32 c^{3/2}}-\frac {d^2 \left (b^2-4 a c\right ) (b+2 c x) \sqrt {a+b x+c x^2}}{16 c}+\frac {d^2 (b+2 c x)^3 \sqrt {a+b x+c x^2}}{8 c} \]
[In]
[Out]
Rule 212
Rule 635
Rule 699
Rule 706
Rubi steps \begin{align*} \text {integral}& = \frac {d^2 (b+2 c x)^3 \sqrt {a+b x+c x^2}}{8 c}-\frac {\left (b^2-4 a c\right ) \int \frac {(b d+2 c d x)^2}{\sqrt {a+b x+c x^2}} \, dx}{16 c} \\ & = -\frac {\left (b^2-4 a c\right ) d^2 (b+2 c x) \sqrt {a+b x+c x^2}}{16 c}+\frac {d^2 (b+2 c x)^3 \sqrt {a+b x+c x^2}}{8 c}-\frac {\left (\left (b^2-4 a c\right )^2 d^2\right ) \int \frac {1}{\sqrt {a+b x+c x^2}} \, dx}{32 c} \\ & = -\frac {\left (b^2-4 a c\right ) d^2 (b+2 c x) \sqrt {a+b x+c x^2}}{16 c}+\frac {d^2 (b+2 c x)^3 \sqrt {a+b x+c x^2}}{8 c}-\frac {\left (\left (b^2-4 a c\right )^2 d^2\right ) \text {Subst}\left (\int \frac {1}{4 c-x^2} \, dx,x,\frac {b+2 c x}{\sqrt {a+b x+c x^2}}\right )}{16 c} \\ & = -\frac {\left (b^2-4 a c\right ) d^2 (b+2 c x) \sqrt {a+b x+c x^2}}{16 c}+\frac {d^2 (b+2 c x)^3 \sqrt {a+b x+c x^2}}{8 c}-\frac {\left (b^2-4 a c\right )^2 d^2 \tanh ^{-1}\left (\frac {b+2 c x}{2 \sqrt {c} \sqrt {a+b x+c x^2}}\right )}{32 c^{3/2}} \\ \end{align*}
Time = 1.09 (sec) , antiderivative size = 101, normalized size of antiderivative = 0.82 \[ \int (b d+2 c d x)^2 \sqrt {a+b x+c x^2} \, dx=\frac {d^2 \left (\sqrt {c} (b+2 c x) \sqrt {a+x (b+c x)} \left (b^2+8 b c x+4 c \left (a+2 c x^2\right )\right )-\left (b^2-4 a c\right )^2 \text {arctanh}\left (\frac {\sqrt {c} x}{-\sqrt {a}+\sqrt {a+x (b+c x)}}\right )\right )}{16 c^{3/2}} \]
[In]
[Out]
Time = 2.71 (sec) , antiderivative size = 114, normalized size of antiderivative = 0.93
method | result | size |
risch | \(\frac {\left (16 c^{3} x^{3}+24 b \,c^{2} x^{2}+8 a \,c^{2} x +10 b^{2} c x +4 a b c +b^{3}\right ) \sqrt {c \,x^{2}+b x +a}\, d^{2}}{16 c}-\frac {\left (16 a^{2} c^{2}-8 a \,b^{2} c +b^{4}\right ) \ln \left (\frac {\frac {b}{2}+c x}{\sqrt {c}}+\sqrt {c \,x^{2}+b x +a}\right ) d^{2}}{32 c^{\frac {3}{2}}}\) | \(114\) |
default | \(d^{2} \left (b^{2} \left (\frac {\left (2 c x +b \right ) \sqrt {c \,x^{2}+b x +a}}{4 c}+\frac {\left (4 a c -b^{2}\right ) \ln \left (\frac {\frac {b}{2}+c x}{\sqrt {c}}+\sqrt {c \,x^{2}+b x +a}\right )}{8 c^{\frac {3}{2}}}\right )+4 c^{2} \left (\frac {x \left (c \,x^{2}+b x +a \right )^{\frac {3}{2}}}{4 c}-\frac {5 b \left (\frac {\left (c \,x^{2}+b x +a \right )^{\frac {3}{2}}}{3 c}-\frac {b \left (\frac {\left (2 c x +b \right ) \sqrt {c \,x^{2}+b x +a}}{4 c}+\frac {\left (4 a c -b^{2}\right ) \ln \left (\frac {\frac {b}{2}+c x}{\sqrt {c}}+\sqrt {c \,x^{2}+b x +a}\right )}{8 c^{\frac {3}{2}}}\right )}{2 c}\right )}{8 c}-\frac {a \left (\frac {\left (2 c x +b \right ) \sqrt {c \,x^{2}+b x +a}}{4 c}+\frac {\left (4 a c -b^{2}\right ) \ln \left (\frac {\frac {b}{2}+c x}{\sqrt {c}}+\sqrt {c \,x^{2}+b x +a}\right )}{8 c^{\frac {3}{2}}}\right )}{4 c}\right )+4 b c \left (\frac {\left (c \,x^{2}+b x +a \right )^{\frac {3}{2}}}{3 c}-\frac {b \left (\frac {\left (2 c x +b \right ) \sqrt {c \,x^{2}+b x +a}}{4 c}+\frac {\left (4 a c -b^{2}\right ) \ln \left (\frac {\frac {b}{2}+c x}{\sqrt {c}}+\sqrt {c \,x^{2}+b x +a}\right )}{8 c^{\frac {3}{2}}}\right )}{2 c}\right )\right )\) | \(354\) |
[In]
[Out]
none
Time = 0.30 (sec) , antiderivative size = 309, normalized size of antiderivative = 2.51 \[ \int (b d+2 c d x)^2 \sqrt {a+b x+c x^2} \, dx=\left [\frac {{\left (b^{4} - 8 \, a b^{2} c + 16 \, a^{2} c^{2}\right )} \sqrt {c} d^{2} \log \left (-8 \, c^{2} x^{2} - 8 \, b c x - b^{2} + 4 \, \sqrt {c x^{2} + b x + a} {\left (2 \, c x + b\right )} \sqrt {c} - 4 \, a c\right ) + 4 \, {\left (16 \, c^{4} d^{2} x^{3} + 24 \, b c^{3} d^{2} x^{2} + 2 \, {\left (5 \, b^{2} c^{2} + 4 \, a c^{3}\right )} d^{2} x + {\left (b^{3} c + 4 \, a b c^{2}\right )} d^{2}\right )} \sqrt {c x^{2} + b x + a}}{64 \, c^{2}}, \frac {{\left (b^{4} - 8 \, a b^{2} c + 16 \, a^{2} c^{2}\right )} \sqrt {-c} d^{2} \arctan \left (\frac {\sqrt {c x^{2} + b x + a} {\left (2 \, c x + b\right )} \sqrt {-c}}{2 \, {\left (c^{2} x^{2} + b c x + a c\right )}}\right ) + 2 \, {\left (16 \, c^{4} d^{2} x^{3} + 24 \, b c^{3} d^{2} x^{2} + 2 \, {\left (5 \, b^{2} c^{2} + 4 \, a c^{3}\right )} d^{2} x + {\left (b^{3} c + 4 \, a b c^{2}\right )} d^{2}\right )} \sqrt {c x^{2} + b x + a}}{32 \, c^{2}}\right ] \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 379 vs. \(2 (110) = 220\).
Time = 0.69 (sec) , antiderivative size = 379, normalized size of antiderivative = 3.08 \[ \int (b d+2 c d x)^2 \sqrt {a+b x+c x^2} \, dx=\begin {cases} \sqrt {a + b x + c x^{2}} \cdot \left (\frac {3 b c d^{2} x^{2}}{2} + c^{2} d^{2} x^{3} + \frac {x \left (a c^{2} d^{2} + \frac {5 b^{2} c d^{2}}{4}\right )}{2 c} + \frac {a b c d^{2} + b^{3} d^{2} - \frac {3 b \left (a c^{2} d^{2} + \frac {5 b^{2} c d^{2}}{4}\right )}{4 c}}{c}\right ) + \left (a b^{2} d^{2} - \frac {a \left (a c^{2} d^{2} + \frac {5 b^{2} c d^{2}}{4}\right )}{2 c} - \frac {b \left (a b c d^{2} + b^{3} d^{2} - \frac {3 b \left (a c^{2} d^{2} + \frac {5 b^{2} c d^{2}}{4}\right )}{4 c}\right )}{2 c}\right ) \left (\begin {cases} \frac {\log {\left (b + 2 \sqrt {c} \sqrt {a + b x + c x^{2}} + 2 c x \right )}}{\sqrt {c}} & \text {for}\: a - \frac {b^{2}}{4 c} \neq 0 \\\frac {\left (\frac {b}{2 c} + x\right ) \log {\left (\frac {b}{2 c} + x \right )}}{\sqrt {c \left (\frac {b}{2 c} + x\right )^{2}}} & \text {otherwise} \end {cases}\right ) & \text {for}\: c \neq 0 \\\frac {2 \cdot \left (\frac {4 c^{2} d^{2} \left (a + b x\right )^{\frac {7}{2}}}{7 b^{2}} + \frac {\left (a + b x\right )^{\frac {5}{2}} \left (- 8 a c^{2} d^{2} + 4 b^{2} c d^{2}\right )}{5 b^{2}} + \frac {\left (a + b x\right )^{\frac {3}{2}} \cdot \left (4 a^{2} c^{2} d^{2} - 4 a b^{2} c d^{2} + b^{4} d^{2}\right )}{3 b^{2}}\right )}{b} & \text {for}\: b \neq 0 \\\frac {4 \sqrt {a} c^{2} d^{2} x^{3}}{3} & \text {otherwise} \end {cases} \]
[In]
[Out]
Exception generated. \[ \int (b d+2 c d x)^2 \sqrt {a+b x+c x^2} \, dx=\text {Exception raised: ValueError} \]
[In]
[Out]
none
Time = 0.30 (sec) , antiderivative size = 153, normalized size of antiderivative = 1.24 \[ \int (b d+2 c d x)^2 \sqrt {a+b x+c x^2} \, dx=\frac {1}{16} \, \sqrt {c x^{2} + b x + a} {\left (2 \, {\left (4 \, {\left (2 \, c^{2} d^{2} x + 3 \, b c d^{2}\right )} x + \frac {5 \, b^{2} c^{3} d^{2} + 4 \, a c^{4} d^{2}}{c^{3}}\right )} x + \frac {b^{3} c^{2} d^{2} + 4 \, a b c^{3} d^{2}}{c^{3}}\right )} + \frac {{\left (b^{4} d^{2} - 8 \, a b^{2} c d^{2} + 16 \, a^{2} c^{2} d^{2}\right )} \log \left ({\left | 2 \, {\left (\sqrt {c} x - \sqrt {c x^{2} + b x + a}\right )} \sqrt {c} + b \right |}\right )}{32 \, c^{\frac {3}{2}}} \]
[In]
[Out]
Time = 10.21 (sec) , antiderivative size = 335, normalized size of antiderivative = 2.72 \[ \int (b d+2 c d x)^2 \sqrt {a+b x+c x^2} \, dx=b^2\,d^2\,\left (\frac {x}{2}+\frac {b}{4\,c}\right )\,\sqrt {c\,x^2+b\,x+a}-a\,c\,d^2\,\left (\left (\frac {x}{2}+\frac {b}{4\,c}\right )\,\sqrt {c\,x^2+b\,x+a}+\frac {\ln \left (\frac {\frac {b}{2}+c\,x}{\sqrt {c}}+\sqrt {c\,x^2+b\,x+a}\right )\,\left (a\,c-\frac {b^2}{4}\right )}{2\,c^{3/2}}\right )-\frac {5\,b\,c\,d^2\,\left (\frac {\ln \left (\frac {b+2\,c\,x}{\sqrt {c}}+2\,\sqrt {c\,x^2+b\,x+a}\right )\,\left (b^3-4\,a\,b\,c\right )}{16\,c^{5/2}}+\frac {\left (-3\,b^2+2\,c\,x\,b+8\,c\,\left (c\,x^2+a\right )\right )\,\sqrt {c\,x^2+b\,x+a}}{24\,c^2}\right )}{2}+c\,d^2\,x\,{\left (c\,x^2+b\,x+a\right )}^{3/2}+\frac {b\,d^2\,\ln \left (\frac {b+2\,c\,x}{\sqrt {c}}+2\,\sqrt {c\,x^2+b\,x+a}\right )\,\left (b^3-4\,a\,b\,c\right )}{4\,c^{3/2}}+\frac {b\,d^2\,\left (-3\,b^2+2\,c\,x\,b+8\,c\,\left (c\,x^2+a\right )\right )\,\sqrt {c\,x^2+b\,x+a}}{6\,c}+\frac {b^2\,d^2\,\ln \left (\frac {\frac {b}{2}+c\,x}{\sqrt {c}}+\sqrt {c\,x^2+b\,x+a}\right )\,\left (a\,c-\frac {b^2}{4}\right )}{2\,c^{3/2}} \]
[In]
[Out]